﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Mall.MCScriptManageServices
{
    public partial class UpdateUserInfo : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string userid = Request["userid"] == null ? "" : Request.Form["userid"];
            string username = Request["username"] == null ? "" : Request.Form["username"];
            string userpwd = Request["userpwd"] == null ? "" : Request.Form["userpwd"];
            string userstate = Request["userstate"] == null ? "0" : Request.Form["userstate"];
            string roleid = Request["roleid"] == null ? "0" : Request.Form["roleid"];
            string remarks = Request.Form["remarks"] == null ? "" : Request.Form["remarks"];
            string id = Request["id"] == null ? "0" : Request.Form["id"];
            MODEL.MAdmin model_user = new MODEL.MAdmin();
            model_user.Userid = userid;
            model_user.UserName = username;
            model_user.UserPwd = userpwd;
            model_user.UserState = userstate;
            model_user.RoleId = Convert.ToInt32(roleid);
            model_user.Id = Convert.ToInt32(id);
            BLL.Models.ManageUser msu = new BLL.Models.ManageUser();
            bool ret = msu.EditUser(model_user);
            string jsons = string.Empty;
            if (ret)
            {

                jsons = "{success:'true'}";

            }
            else
            {

                jsons = "{success:'false'}";
            }
            Response.Write(jsons);
        }
    }
}